package com.vhly.ddxdecompiler.dexreader.file.mixeditem;

import com.vhly.ddxdecompiler.dexreader.file.DexFile;
import com.vhly.ddxdecompiler.dexreader.file.TypeIdsSection;

import java.io.ByteArrayInputStream;

/**
 * Created by IntelliJ IDEA.
 * User: vhly
 * Date: 2009-10-15
 * Time: 12:45:05
 *
 * @author vhly[FR]
 */
public final class FieldIdItem extends MemberIdItem {

    TypeIdItem classItem;
    TypeIdItem typeItem;
    StringIdItem nameItem;

    public FieldIdItem(DexFile dexFile) {
        super(dexFile);
    }

    public void reloc(ByteArrayInputStream bin, int offset) {
        TypeIdsSection types = dex.getTypeIds();
        classItem = types.indexOf(classIdx);
        typeItem = types.indexOf(typoidIdx);
        nameItem = dex.getStringIds().indexOf(nameIdx);
    }
}
